package com.liuweidihuangwan.jingdong.controller;


import com.liuweidihuangwan.jingdong.common.BaseResponse;
import com.liuweidihuangwan.jingdong.model.dto.user.UserLoginRequest;
import com.liuweidihuangwan.jingdong.model.vo.UserVO;
import com.liuweidihuangwan.jingdong.service.UserinfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author author
 * @since 2025-01-08
 */
@RestController
@RequestMapping("/userinfo")
@Api(tags = "用户相关接口")
public class UserinfoController {

    @Resource
    UserinfoService userinfoService;
    @PostMapping("/login")
    @ApiOperation("用户登录接口")
    BaseResponse<UserVO> userLogin(@RequestBody UserLoginRequest userLoginRequest){
        return userinfoService.userLogin(userLoginRequest);
    }

}
